package jzc.mzxy.datebinding;

import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

public class RetrofitUtils {
   static Retrofit retrofit;
    public static Retrofit getRetrofit(){
        if (retrofit==null){
             retrofit=new Retrofit.Builder()
                    .baseUrl("http://148.70.46.9:8080/boxuegu/bxg/")
                    .addConverterFactory(GsonConverterFactory.create())
                    .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                    .build();

        }

        return retrofit;

    }
}
